<div>
<ul class="nav nav-pills">
			<li class="col-xs-2 col-xs-2-nav col-xs-offset-1"><a href="<spring:url value="/"/>">	
				<span class="glyphicon glyphicon-home"></span> 
				My Page</a></li>
			
			<li class="col-xs-2 col-xs-2-nav"><a href="<spring:url value="/userWall"/>">
			<span class="glyphicon glyphicon-comment"></span> 
					My Wall</a></li>
			
			<li class="col-xs-2 col-xs-2-nav">
			<a href="<spring:url value="/communities"/>"><span
					class="glyphicon glyphicon-list-alt"></span> Communities</a></li>
			
			<li class="col-xs-2 col-xs-2-nav">
			<a href="#" class="dropdown-toggle"
				data-toggle="dropdown" role="button" aria-expanded="false"><span
					class="glyphicon glyphicon-tasks"></span> Activities<span
					class="caret"></span></a>
				<ul class="dropdown-menu" role="menu">
					<li><a href="<spring:url value="/events"/>"> Events</a></li>
					<li><a href="<spring:url value="/requests"/>"> Requests</a></li>
					<li><a href="<spring:url value="/offers"/>"> Offers</a></li>
				</ul></li>
			
			<li class="col-xs-2 col-xs-2-nav"><a href="<spring:url value="/people"/>"><span
					class="glyphicon glyphicon-user"></span> People</a></li>
			
			<li class="col-xs-2 col-xs-2-nav col-xs-offset-1"><a href="<spring:url value="/j_spring_security_logout"/>"><span
					class="glyphicon glyphicon-off"></span> Logout</a></li>
</ul>
</div>
<script>
$(function() {
        // this will get the full URL at the address bar
        var url = window.location.href.toString();
		var splitted=url.split("/",5);
		url=splitted.toString();
		url=url.replace(/,/g,"/");
        // passes on every "a" tag
        $(".nav-pills a").each(function() {
            // checks if its the same on the address bar
            if (url==(this.href)) {
                $(this).closest("li").addClass("active");
            }	
        });
    });   
</script> 
<hr style="margin-top:6px !important;">


